
toastLog('开始执行主程序');
/****-------------------------------------运行环境获取*/
var xmpz=storages.create("xinglin_qiandao");
let sjxh=xmpz.get("sjxh");log('d-s'+sjxh);
let USER_ID=xmpz.get("USER_ID");log('d-U'+USER_ID);
let ROBOT_ID=xmpz.get("ROBOT_ID");log('d-R'+ROBOT_ID);
let model=xmpz.get("model");log('d-m'+model);
let onFreeTrial=xmpz.get("onFreeTrial");
let qjyc=xmpz.get("qjyc");log('d-q'+qjyc);
let yxhj=xmpz.get("yxhj");log('d-y'+yxhj);
let jiesuo=xmpz.get("jiesuo");log('d-j'+jiesuo);

let pzscxx=xmpz.get("pzscxx");log('d-p'+pzscxx);
let xiangm=xmpz.get("xiangm");log('d-x'+xiangm);
sleep(qjyc+111);


/****-------------------------------------项目环境*/
jietuquanx();
let sspscxs=1.2;
log('短视频时长系数'+pzscxx);
try {if(parseFloat(pzscxx)>0){sspscxs=parseFloat(pzscxx);log('短视频时长：');log(sspscxs*30)}} catch(err){log('未找到短视频时长系数')};

let pzar=[];
for(var xmhq of xiangm){ 
    pzar.push([xmhq,'自动检测是否双开']);
};
log('勾选项目');
log(pzar);
//音量调为0

//音量键监听
let 音量键监听=threads.start(registerKey);
log('按音量-来停止脚本')


//延迟
dyc=5000;
xyc=1000;
zyc=2000;
cscs=0
//变量
let shuangk=1;
let jgarr=[];
let jg='';
let shuangkcs=0;
let ydcsz=0;
let cc=1;
let apmc='1';
let appk='1';
let xm=1;
let 执行进程=1;
let djjg=0;
let kd=device.width;
let gd=device.height;
let kdxs=kd/1080;
let gdxs=gd/2340;

let wzarr=['https://kaixin88.github.io/tfb/','https://kaixin88.github.io/ky/','https://kaixin88.github.io/ysm/']
log(wzarr);
let bcydwz=wzarr[parseInt(Math.random() * wzarr.length, 10)];
let arr=[bcydwz];
let spyc=3200+Math.round(Math.random()*300);
log(spyc);log('spyc');

//时间控制
let dqsj=parseInt(formatDate(new Date(), "YYYYMMDD"));
if(dqsj<20231030){log(11)}
else {console.show();toastLog('当前版本已失效，请更新至新版本后运行！');exit();};

//版本控制
let dqbb='HJ08';
var r = http.get('https://xinglin2077.github.io/qiandao/');
if(r.body.string().indexOf(dqbb)>0){log('版本正确...')}
else {console.show();toastLog('当前版本已失效，请更新至新版本后运行！');exit();};

for(xm of pzar){ 
    apmc=xm[0];
    toastLog(xm[0]+'自动检测是否双开...');shuangk=1;xzxm(xm[0]);
};

function xzxm(xx){
    switch(xx){
    case '花花视频': hhspzx();break; 
    case '支付宝': zfbzx();break; 
    case '微信阅读': wxydzx([bcydwz]);break;
    case '京东特价': jdtjzx();break;
    case '京东特价版': jdtjzx();break;
    case '京东金融': jdjrzx();break;
    case '京东': jdzx();break;
    case '建行生活': jhshzx();break;
    case '天翼云盘': tyyzx();break;
    case '国航': ghzx();break;
    case '一刻相册': ykxczx();break;
    case '淘特': ttzx();break;
   	case '淘宝': tbzx();break;
    case '快手极速版': ksjsbzx();break;
    case '快手': kszx();break;
    case '抖音极速版': dyjsbzx();break;
    case '抖音火山版': dyhsbzx();break;
   case '什么值得买': smzdmzx();break;
   case '京喜': jxzx();break;
    default:break;
    };
};
console.show();
toastLog(pzar);
jg='星临签到运行完毕。';
try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
toastLog('运行完毕。');
toastLog('请手动关闭窗口。');
exit();







//----------------------------------执行函数部分---------------------------------------------

function jdtjzx(){
    try{
    apmc=xm[0];
    shuangkcs=0
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        log('目前做单双开：'+shuangkcs+'，总任务：'+shuangk)
        appk = getPackageName(apmc);
        shuangkcs++;
        log('单双开下次次数：'+shuangkcs)
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
        huisy('搜索');
        toastLog('返回键退出广告');back();sleep(3500);back();sleep(3500);back();
        //-------签到免单--------
        click('签到免单');
        toastLog('已点击签到免单')
        c=text('全场签到全额返').packageName(appk).findOne(8000);
        if(c!=null){
            log('已进入签到免单页面');
           
        }else{
            log("未进入签到免单页面");
            huisy('搜索');click('签到免单');
            text('全场签到全额返').packageName(appk).findOne(12000);
            }
        toastLog('立即签到')
        djjg=djzb('立即签到');
   
        c=text('明天继续').packageName(appk).findOne(12000);
        if(c!=null||djjg){
            toastLog('已签到');
            jg=apmc+shuangkcs+'免单签到'+'成功';
        }else{
            toastLog("未成功签到");
            jg=apmc+shuangkcs+'免单签到'+'：失败';
            }
        xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        huisy('搜索');
   
        //开始领红包，第二次进入开始
        toastLog('开始领红包，第二次进入开始领')
        click('领红包');sleep(4000)
        huisy('搜索');
        click('领红包');
        c=text('活动规则').packageName(appk).findOne(12000);
        if(c!=null){
            toastLog('已进入领红包');
           
        }else{
            toastLog("未进入领红包");
            huisy('搜索');;click('领红包');
            text('活动规则').packageName(appk).findOne(12000);
            }
        toastLog('点击领奖')
        djjg=djzb('今日剩余');sleep(4000);
        if(djjg){
            log('已签到');
            jg=apmc+shuangkcs+'天天领红包'+'成功';
           
        }else{
            log("未成功签到");
            jg=apmc+shuangkcs+'天天领红包'+'：失败';
            }   
        xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        djzb('今日剩余');sleep(4000);
        djzb('今日剩余');sleep(4000);djzb('今日剩余');sleep(4000);
        click('查看奖品');sleep(3000);
        toastLog('点击提现')
        try{djzb('去提现',1);sleep(2000);djzb('我知道了',1);sleep(2000);djzb('去提现',1);sleep(3000);} catch(err){};
        huisy('搜索');
        //签到提现---------------------------------------------------------------
        djjg=click('签到提现');
        if(djjg){
            toastLog('已签到');
            jg=apmc+shuangkcs+'签到提现'+'成功';
           
        }else{
            toastLog("未成功签到");
            jg=apmc+shuangkcs+'签到提现'+'：失败';
            }
        xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        sleep(8000);
      	djzb('我的奖励');sleep(2000);djzb('去提现');;sleep(1000)
        huisy('搜索');
        djjg=click('签到提现');
        sleep(8000);
        //应用内返回退出模式
        back();back();back();back();back();back();
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*5*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);

};

//---------------------------京东----------------------
function jdzx(){
    try{
    apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
      back();sleep(3300);back();sleep(3300);
        				huisy('免费水果');
        var te="领京豆"
        var w = text(te).findOne(3000);
        if(w!= null){
          var b = w.bounds();
          click(b.centerX(), b.centerY());
          toastLog('点进领京豆');
          sleep(8000)
          djjg=djzb('签到领京豆');

          if (djjg){jg=apmc+shuangkcs+'签到'+'成功✅';}
          else{jg=apmc+shuangkcs+'签到'+'失败'; };
         }
         else{
          //否则提示没有找到
          log("第一次点击签到错误");         
        };
      	xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        huisy('规则');
      //双签
        huisy('查看更多 >');
      //双签
				var kd=device.width;var gd=device.height;
				click(152*kd/1080,1460*gd/2340);sleep(12000);
        djjg=djzb('完成双签领取');
        if(djjg){jg=apmc+shuangkcs+'双签领京豆'+'成功✅';} else{jg=apmc+shuangkcs+'双签领京豆'+'失败';};
        xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        huisy('查看更多 >');
      //特价
				click(729*kd/1080,1440*gd/2340);sleep(12000);
        djjg=djzb('去领取');
        if(djjg){jg=apmc+shuangkcs+'特价领京豆'+'成功✅';} else{jg=apmc+shuangkcs+'特价领京豆'+'失败';};
      	xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        //京喜
				click(729*kd/1080,1440*gd/2340);sleep(12000);
        djjg=djzb('去领取');
        if(djjg){jg=apmc+shuangkcs+'京喜双签领京豆'+'成功✅';} else{jg=apmc+shuangkcs+'京喜双签领京豆'+'失败';};
      	xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        print(pzar);
        back();back();back();back();back();back();back();back();back();back();
    }
});
    }
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*5*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};			

//---------------------------京东金融----------------------
function jdjrzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
      back();sleep(3300);back();sleep(3300);
        huisy('权益中心');
        				var te="签到"
        var w = text(te).findOne(3000);
        if(w!= null){
          var b = w.bounds();
          click(b.centerX(), b.centerY());
          toastLog('点进签到');
          sleep(12000)
          djjg=djzb('签到领金贴');
          if (djjg){jg=apmc+shuangkcs+'签到'+'成功✅';}
          else{jg=apmc+shuangkcs+'签到'+'失败'; };
         }
         else{
          log("点击签到错误");         
        };
      	xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        print(pzar);
        back();back();back();back();back();back();back();back();back();back();
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*3*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);

};
//-----------建行生活-------------------------------------------
function jhshzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
        try{c=packageName("com.ccb.longjiLife").className("android.widget.Image");
        c.click();toastLog('关闭广告并定位');} catch(err){log(11)};
        try{sleep(zyc);click('取消');} catch(err){log(111)};
        //取消后上滑
        sleep(8000);shyc();
        try{c=packageName("com.ccb.longjiLife").className("android.widget.Image");
        c.click();toastLog('关闭广告并定位');} catch(err){log(11)};
        try{sleep(zyc);click('取消');} catch(err){log(111)};
        //点击签到
        sleep(dyc)
        var te="信用卡专享"
        var w = textContains(te).findOne(dyc);
        if(w!= null){
            var b = w.bounds();
            click(b.centerX(), b.centerY());
            toastLog('点进签到')
        }else{
            //否则提示没有找到
            log("第一次点击签到错误");
        }
        sleep(zyc)
        te='Pt90QGenpwejjWSBwnud7LnjOC+znaYO5esmHTixZzRzo';
        var w = textContains(te).findOne(2000);
            if(w!= null){
                var b = w.bounds();
                click(b.centerX(), b.centerY());
                toastLog(b.centerX(), b.centerY())
                log('点进签到')
            }else{
                //否则提示没有找到
                toastLog("第二次点击签到错误");
            }
        sleep(5000)
        var c=text("立即签到").findOne(dyc);
        if(c!= null){c.click();log('找到立即签到并点击');
                     var d=text("我知道了").findOne(dyc);
                     if(d!= null){d.click();toastLog('签到成功');
                                  jg=apmc+shuangkcs+'签到'+'成功✅';}
                    }
        else if(djzb('今日已签到')){toastLog('签到成功');jg=apmc+shuangkcs+'签到'+'成功✅';}
        else {toastLog("未发现签到");jg=apmc+shuangkcs+'签到'+'失败';};
        xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        print(pzar);
        back();back();back();back();back();back();
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*3*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);

};	
//---------------------------淘宝----------------------
function tbzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
      back();sleep(3300);back();sleep(3300);
        //点击签到
        var te="签到"
        var w = desc(te).findOne(2000);
        if(w!= null){
          var b = w.bounds();
          click(b.centerX(), b.centerY());
          toastLog('点进签到');
          jg=apmc+shuangkcs+'签到'+'成功✅';
        }else{
          //否则提示没有找到
          log("第一次点击签到错误");jg=apmc+shuangkcs+'签到'+'失败';         
        };
        djzb('立即收下');djzb('立即签到');djzb('签到');sleep(2000);djzb('2188-2-t',1);
        sleep(5000);huisy('天猫超市');
        var te="签到"
        var w = desc(te).findOne(2000);
        if(w!= null){
          var b = w.bounds();
          click(b.centerX(), b.centerY());
          toastLog('再次进入');jg=apmc+shuangkcs+'签到'+'失败';
          jg=apmc+shuangkcs+'签到'+'成功✅';
          xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
        }else{
          //否则提示没有找到
          log("第一次点击签到错误");
        };
        sleep(7000);
        djzb('立即收下');djzb('立即签到');djzb('签到');sleep(2000);djzb('2188-2-t',1);        
        djjg=djzb('43.png_',1);
        if (djjg){for(hd=0;hd<11;hd++){
          shyc();sleep(random(3000,4000));
          print('滑动：'+hd.toString());};}
        djzb('43.png_',1);
        djzb('去赚元宝',1);djzb('去逛逛',1);
        for(hd=0;hd<11;hd++){
          shyc();
          sleep(random(3000,4000));
          print('滑动：'+hd.toString());};
        back();sleep(3000);djzb('43.png_',1);
        djjg=djzb('立即赚元宝');
        if (djjg){for(hd=0;hd<11;hd++){
          shyc();
          sleep(random(3000,4000));
          print('滑动：'+hd.toString());};}        
        print(pzar);
        back();back();back();back();back();back();
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*5*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);

};

//-----------微信阅读---------------------
function wxydzx(wzjh){
    try{
    xm[0]='微信';shuangkcs=0;
    apmc=xm[0];
    var arr=wzjh
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
    huisy('通讯录');
    djzb('com.tencent.mm:id/f2s',2)
    sleep(2000)
    //进入作业，等待界面加载完成
    var hdl=1
    toastLog("找文件传输助手：文件传输助手最好置顶");
    var wz2='文件传输助手';
    c=text(wz2).findOne(2000);
    while(hdl<7){
        if(c){click(wz2);log('已找到文件传输助手');break;}
        else{toastLog('未找到文件传输助手');shyc();sleep(2000)}
        hdl=hdl+1;
    }
    if(hdl==7){toastLog('未找到文件传输助手，本微信任务跳出');continue;};
    toastLog('寻找或发送网址')
   //发送日志网址
    let yxrz='运行日志在http://klxj.xyz/jilu/jilu.php?id='+USER_ID;
    try{ if(text(yxrz).findOne(2000)){print('已有日志网址')} else {input(yxrz);
        sleep(1000);click('发送');sleep(1000);}} catch(err){};
    for(var item of arr) {
        if(text(item).findOne(2000)){log('已找到上次发送网址')} else {input(item);
            sleep(1000);
            click('发送');
            sleep(1000);}
    };
    toastLog('开始阅读');
    djjg=0
    for(var item of arr) {
            let ecdj=0;
        djjg=djzb(item);
        sleep(zyc);
        try{ecdj=djzb(item);} catch(err){};
        if(djjg||ecdj){print('成功点击')} else {log('未点击，跳出循环');continue;};
      sleep(3000);
        if(!text('文件传输助手').findOne(3000)){log('已进入网址')} else {toastLog('未成功点击，本网址跳过');
                try{if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{click(60*kd/1080,142*gd/2340);log(2)}} catch(err){print(1)}
                                                                            continue;};
            sleep(3000);toast('首次进入判定时间较长，需判定是否继续访问');
        //进入进程
        try{ try{进入文章进程.interrupt(); }catch(err){};
        进入文章进程 = threads.start(function() {
            djzb('继续访问',1);djzb('使用完整服务',1);djzb('允许',1);djzb('同意',1);djzb('任务中心');
            djzb('允许',1);djzb('继续访问',1);djzb('同意',1);djzb('停止阅读',1);djzb('开始阅读',1);
            djzb('继续访问',1);djzb('停止阅读',1);sleep(2000);djzb('开始阅读',1);djzb('开始阅读',3);
        }); 
        }catch(err){log(222);log(err.message);};
        //判定
        try{ try{判定失效进程.interrupt(); }catch(err){};
            判定失效进程 = threads.start(function() {
            if(textMatches(/.*阅读更新中.*|.*暂时失效.*/).findOne(30000)){进入文章进程.interrupt();判断进入阅读.interrupt();};
        }); 
        }catch(err){log(222);log(err.message);};
        //判断已进入
        try{ try{判断进入阅读.interrupt(); }catch(err){};
        判断进入阅读 = threads.start(function() {
            if(textContains('发表于').findOne(30000)){进入文章进程.interrupt();};判定失效进程.interrupt(); }); 
        }catch(err){log(222);log(err.message);};
        判断进入阅读.join(30000);
            try{click('确定');sleep(200);click('确定');sleep(200);click('确定');sleep(200);click('确定');sleep(200);} catch(err){print(11)};
        if(descContains('已停止访问').findOne(100)||textContains('已停止访问').findOne(100)
        ||textContains(item).findOne(100)
        ||descContains('网页包含诱导分享').findOne(100)||textContains('网页包含诱导分享').findOne(100)
        ||descContains('继续访问').findOne(100)||textContains('继续访问').findOne(100)
        ||descContains('申请恢复').findOne(100)||textContains('申请恢复').findOne(100))
        {toastLog('停止访问');if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{click(60*kd/1080,142*gd/2340);log(2)}; } 
        //没有停止访问则停止
        else{toastLog('未发现停止访问，继续...');
            var ydcs=0
            while(ydcs<33){
                if(descContains('阅读更新中').findOne(100)||textContains('阅读更新中').findOne(100)
                ||descContains('提现').findOne(100)||textContains('提现').findOne(100)
                ||descContains('积分兑换').findOne(100)||textContains('积分兑换').findOne(100)
                ||descContains(item).findOne(100)||textContains(item).findOne(100))
                {toastLog('停止阅读'+',总阅读成功：'+ydcsz.toString()); ydtx();
                if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{click(60*kd/1080,142*gd/2340);log(2)};
                ydcs+=50;} 
                //能阅读才阅读
                else{toastLog('继续阅读');
                    for(hd=0;hd<8;hd++){
                    shyc();
                    sleep(random(100,500));
                    print('滑动：'+hd.toString());}back();
                    if(text('文件传输助手').findOne(3000)){toastLog('未在阅读网址');break;} 
                    else {log('已进入网址')};
                    sleep(random(7000,7500));djzb('领取失败');
                ydcs+=1;ydcsz+=1;toastLog('阅读次数：'+ydcs.toString())
                    } }
            }
        toastLog('任务完成1次');

  };
    sleep(2000)
    print('循环完成1次');        
    back();back();back();back();back();back();
    }
});
    }
    catch(err){toastLog(apmc+'执行过程中出错')}
    //汇总结果
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*22*60*1000);
    xm[0]='微信阅读';
    jg=apmc+'阅读'+ydcsz;
    xm.push(jg); 
    try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
    catch(err){};
    toastLog(pzar)
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
};


//-----------花花视频---------------------
function hhspzx(wzjh){
    try{
    xm[0]='微信';shuangkcs=0;
    apmc=xm[0];
    var arr=wzjh
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){  
        var fufei=1
        toast('请将文件传输助手置顶，否则可能找不到')
        sleep(qjyc+2000)
        toast('阅读过程中，按【音量减】键停止脚本')
        sleep(qjyc+2000)

        var dianzancs=2;
        guanzhucs  = 2;

        let arr=['https://kaixin88.github.io/hhsp']

        let apmc="微信";
        let appk = getPackageName(apmc); //返回"com.tencent.mobileqq"

        let rwhcs=3;
        let hhspyc=10000;
        let gzcs=0;
        let axcs=0;
        let ydcs=0;

        xm=['微信']
        apmc=xm[0];shuangkcs=0;
            gzcs=0;axcs=0;ydcs=0;
            appk = getPackageName(apmc);
            shuangkcs++;
            gbapp(apmc);
            if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
            huisy('通讯录','微信');;
            djzb('com.tencent.mm:id/f2s',2)
            sleep(qjyc+2000)
            //进入作业，等待界面加载完成
            var hdl=1
            toast("找文件传输助手：文件传输助手最好置顶");
            var wz2='文件传输助手';
            c=text(wz2).findOne(2000);
            while(hdl<3){
            if(c){click(wz2);print('已找到文件传输助手');break;}
            else{print('未找到文件传输助手');hdhs();sleep(qjyc+4000)}
            hdl=hdl+1;
            };
            if(hdl==7){toast('未找到文件传输助手，本微信任务跳出');};
            toast('寻找或发送网址');
            //发送日志网址
            let yxrz='运行日志在http://klxj.xyz/jilu/jilu.php?id='+USER_ID;
            try{ if(text(yxrz).findOne(2000)){print('已有日志网址')} else {input(yxrz);
                sleep(qjyc+1000);click('发送');sleep(qjyc+1000);}} catch(err){};

            for(var item of arr) {
            if(text(arr[0]).findOne(2000)){print('已找到上次发送网址')} else {input(item);
                sleep(qjyc+1000);
                click('发送');
                sleep(qjyc+1000);}
            };
            for(var item of arr) {
                log('开始执行')
                if(!wxjrwz(item)){toastLog('未能进入网址，跳过');continue;}else{log('1235')};
                toastLog('首次请手动进入完成一个，正在执行...');
                //进入进程
                try{ try{进入文章进程.interrupt(); }catch(err){};
                进入文章进程 = threads.start(function() {
                                                djzb('不再提醒');djzb('✕'); 
                }); 
                }catch(err){log(222);log(err.message);};
                //判断已进入
                sleep(qjyc+3000);
                try{ try{判断二次进入.interrupt(); }catch(err){};
                判断二次进入 = threads.start(function() {
                    if(!textContains('使用完整服务').findOne(7000)){进入文章进程.interrupt();};}); 
                }catch(err){log(222);log(err.message);};
                判断二次进入.join(10000); 
                toastLog('判断是否停止访问'); 
                        djzb('换一个');
                djzb('积分兑换');sleep(qjyc+1500);
                if(!(textContains('1578142353028415488').findOne(2000)||
                    textContains('11193600').findOne(100)||
                    textContains('9710336').findOne(100)||
                    fufei))
                {toastLog('非好友，请稍后购买付费版');执行进程.interrupt();}
                if(descContains('已停止访问').findOne(100)||textContains('已停止访问').findOne(100)
                ||textContains(item).findOne(100)
                ||descContains('网页包含诱导分享').findOne(100)||textContains('网页包含诱导分享').findOne(100)
                ||descContains('继续访问').findOne(100)||textContains('继续访问').findOne(100)
                ||descContains('申请恢复').findOne(100)||textContains('申请恢复').findOne(100))
                {toast('停止访问');ydtx();if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{click(60*kd/1080,142*gd/2340);log(2)};} 
                //没有停止访问则停止
                else{toast('未发现停止访问，继续...');              
                    while(gzcs<guanzhucs||axcs<dianzancs){
                        toast('重新回到传输助手，任务执行中...')
                        huisy('文件传输助手','微信');
                        if(!wxjrwz(item)){toastLog('未能进入网址，跳过');continue;};
                        if(!(textContains('视频点爱心').findOne(100)||textContains('视频点关注').findOne(100)))
                        {gzcs=100;axcs=100;toastLog('已无两类视频任务')};
                        if(axcs<dianzancs){cc=hhspzx('爱心',axcs)};log('cc:'+cc);if(cc>50){axcs=50};if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{
                            if(!text('文件传输助手').findOne(3000)){click(60*kd/1080,142*gd/2340);log(2)}};huisy('文件传输助手','微信');
                        if(!wxjrwz(item)){toastLog('未能进入网址，跳过');continue;};
                        if(gzcs<guanzhucs){cc=hhspzx('关注',gzcs)};log('cc:'+cc);if(cc>50){gzcs=50};if(djzb('com.tencent.mm:id/g1',2)){log(1)} else{
                            if(!text('文件传输助手').findOne(3000)){click(60*kd/1080,142*gd/2340);log(2)}};huisy('文件传输助手','微信');
                        gzcs++;axcs++;
                    } 
                }
            }
                toast('任务完成1次');
            huisy('文件传输助手','微信');
                    if(!wxjrwz(item)){toastLog('未能进入网址，跳过');continue;};
                            djzb('积分兑换');sleep(qjyc+2000);djzb('提现');sleep(qjyc+2000);djzb('打开');sleep(qjyc+6000);
                        djzb('0.5元');sleep(qjyc+2000);djzb('确定');sleep(qjyc+2000);djzb('立即提现');sleep(qjyc+2000);
                

        back();back();back();back();back();back();back();back();back();back();

        //视频任务执行
        function hhspzx(jtxm,jtcs){
            if(text('文件传输助手').findOne(3000)){toastLog('未在阅读网址');return 12;} else {log('继续2')};
            if(jtxm=='爱心'){var jtxmc='暂无点爱心视频'; var djwz='视频点爱心';}
            else  {jtxmc='暂无点关注视频';djwz='视频点关注';};
            if(jtcs<10){
                if((descContains(jtxmc).findOne(100)||textContains(jtxmc).findOne(100)||textContains(jtxm+'的花花已达到领取上限').findOne(100)))
                {toast('无此任务，停止执行'+jtxm);return 53} 
                if((descContains('点'+jtxm+'视频').findOne(100)||textContains('点'+jtxm+'视频').findOne(100)))
                {toast('时间未到，跳过此次'+jtxm);return 51} 
                //能阅读才阅读
                else{toast('继续');djzb('换一个');sleep(qjyc+1200);
                    if(!djzb(djwz,1)){return 13};
                    if(textContains('当前任务领取频繁').findOne(3000)){return 66};
                    if(w=textContains('长按识别二维码进入').findOne(1000))
                    {b=w.bounds();press(b.centerX(),b.centerY()+gd/10,2500);};
                    if(djzb('识别图中的二维码')){
                        toastLog('等待约1分钟');
                        sleep(qjyc+random(3*hhspyc,8*hhspyc));
                        if(jtxm=='爱心'){djzb('com.tencent.mm:id/f1x',2);}
                        else {djzb('关注');};
                        sleep(qjyc+random(1*hhspyc,2*hhspyc));jietumc=jietu();
                        log(jietumc);sleep(qjyc+random(1*hhspyc,2*hhspyc));
                        //再看点
                        for(hd=0;hd<rwhcs;hd++){
                            hdhs();toastLog('再看点视频');
                            sleep(qjyc+random(2*hhspyc,4*hhspyc));}
                        djzb('我知道了');sleep(qjyc+200);huisy('上传任务截图','微信');
                        sleep(qjyc+2000);if(w=textContains('上传任务截图').findOne(1000))
                        {b=w.bounds();click(b.centerX(),b.centerY()+gd/8);};
                        //点下载
                        sleep(qjyc+1000);djzb('android:id/icon',2);
                        sleep(qjyc+2000);if(!djzb(jietumc,1)){djzb(jietumc,3)};
                        sleep(qjyc+2000);djzb('确认提交');if(djzb('确定')){back();};
                    };
                    if(text('文件传输助手').findOne(3000)){toastLog('未在阅读网址');return 14;} else {log('继续2')};
                    return 1
                    } 
            } else{toastLog('此类任务做够了，本次停止');}
        }

    sleep(2000)
    print('循环完成1次');        
    back();back();back();back();back();back();
    }
});
    }
    catch(err){toastLog(apmc+'执行过程中出错')}
    //汇总结果
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*22*60*1000);
    xm[0]='花花视频';
    xm.push(jg); 
    try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
    catch(err){};
    toastLog(pzar)
    执行进程.interrupt();gbapp(apmc);
};

//---------------------------天翼云----------------------
function tyyzx(){
    try{
    apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk=getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
        //回到首页
      back();sleep(3300);back();sleep(3300);
				for(icc=1;icc<8;icc++){
        toastLog(appk)
        var cc=desc('我的服务').packageName(appk).findOne(1000);
        if(cc!= null){
            toastLog('已到首页');
        }else{
            toastLog("未回到首页");back();sleep(3000);}
        }
				click(930*kd/1080,2260*gd/2340);
				sleep(2000);back();sleep(3000);
         djjg=djzb('每日签到',3);
         if (djjg){jg=apmc+shuangkcs+'签到'+'成功✅';}
         else{jg=apmc+shuangkcs+'签到'+'失败'; };
         djjg=djzb('做任务',1);
				sleep(3000);
         djjg=djzb('去完成');sleep(3000);djjg=djzb('package_01');
         if (djjg){jg=apmc+shuangkcs+'签到、拆红包'+'成功✅';}
         else{jg=apmc+shuangkcs+'签到、拆红包'+'失败'; };
      	xm.push(jg); 
    try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
    catch(err){};
        print(pzar);
        back();back();back();back();back();back();back();back();back();back();
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错')}
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(shuangk*2*60*1000);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);

};
//--------------------快手极速版-----------------------------------------
function ksjsbzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间')
        //回到首页
        dsphsy();jg=apmc+shuangkcs+'成功✅';log(jg); log(1234567);
        click(769*kd/1080+Math.random()*3,2271*gd/2340+Math.random()*3);;sleep(13000);
        sleep(1300);
        kgg('看视频最高得','领取奖励');kgg('看广告','领取奖励');
        dsphsy();    
        hdhs();sleep(spyc);djjg=djzb('点击翻倍');click(959*kdxs,439*gdxs);sleep(spyc);
        dsphsy();    
        hdhs();sleep(spyc);djjg=djzb('点击翻倍');click(959*kdxs,439*gdxs);sleep(spyc);
        dsphsy();    
        hdhs();sleep(spyc);djjg=djzb('点击翻倍');click(959*kdxs,439*gdxs);sleep(spyc);
        dsphsy();   
         hdhs();sleep(spyc);djjg=djzb('点击翻倍');click(959*kdxs,439*gdxs);sleep(spyc);
        dsphsy();   
        click(769*kd/1080+Math.random()*3,2271*gd/2340+Math.random()*3);
        toastLog('去赚钱');sleep(10000);
        djzb('开宝箱',1);toastLog('开宝箱');sleep(2000);
        kgg('看视频最高得','领取奖励');kgg('看广告','领取奖励');
        dsphsy();  console.show();
        for(i=1;i<1000;i++){
            var sjs=Math.floor(Math.random()*20+1);
          log(sjs);djzb('点击翻倍');
            //上滑
            if(sjs<20){hdhs();} else{toastLog('上滑')};
            //下滑
            if(sjs>18){hdhs(1);} else{};
            //点赞
            if(sjs==19||sjs==11) 
            {click(kd/2+sjs,gd/2+sjs);sleep(55+sjs);click(kd/2+sjs,gd/2+sjs);toastLog('点赞');}                      
            //去广告返回
            if(sjs<4){back();};  
            sleep(Math.random()*4000+6000);log(Math.random()*4000+6000);
          	toastLog('观看：'+i);
          if(i==80||i==150||i==220||i==400){       
            click(769*kd/1080+Math.random()*3,2271*gd/2340+Math.random()*3);
          toastLog('去赚钱');sleep(10000);
          djzb('开宝箱',1);toastLog('开宝箱');sleep(2000);
          kgg('看视频最高得','领取奖励');kgg('看广告','领取奖励');dsphsy(); };
           if(packageName(appk).findOne(1000)){}
  		    else{dkapp(apmc);back();sleep(3400);back();sleep(3400);hdhs();sleep(340);back();sleep(3400);back();sleep(3400);};
        jg=apmc+shuangkcs+'成功✅';
        }
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'刷视频'+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*30*60*1000);
    xm.push(jg); 
    try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
    catch(err){};console.hide();
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//--------------------快手-----------------------------------------
function kszx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间')
        //回到首页
        dsphsy();gbtc();sleep(zyc+2000);jg=apmc+shuangkcs+'成功✅';log(jg); log(1234567);
        try{click(122*kd/1080+Math.random()*3,514*gd/2340+Math.random()*3);
            djzb('com.smile.gifmaker:id/pendant_mask_bg',2);sleep(3000);} catch(err){};
        sleep(4000);djzb('立即领取');sleep(4000);djzb('立即领取');djzb('知道了');
        back();sleep(spyc);back();hdhs();sleep(3500);gbtc();dsphsy();sleep(spyc);
      	try{click(122*kd/1080+Math.random()*3,514*gd/2340+Math.random()*3);
            djzb('com.smile.gifmaker:id/pendant_mask_bg',2);sleep(3000);} catch(err){};
        sleep(spyc);back();sleep(spyc);back();hdhs();sleep(3500);gbtc();sleep(spyc);
      	try{click(122*kd/1080+Math.random()*3,514*gd/2340+Math.random()*3);
            djzb('com.smile.gifmaker:id/pendant_mask_bg',2);sleep(3000);} catch(err){};
        sleep(spyc);back();sleep(spyc);back();hdhs();sleep(3500);gbtc();sleep(spyc);
        console.show();
        for(i=1;i<2220;i++){
            if(i==80||i==150){
                try{click(122*kd/1080+Math.random()*3,514*gd/2340+Math.random()*3);
                    djzb('com.smile.gifmaker:id/pendant_mask_bg',2);sleep(3000);} catch(err){};
                sleep(4000);djzb('立即领取');sleep(4000);djzb('立即领取');djzb('知道了');dsphsy();
            }
            var sjs=Math.floor(Math.random()*20+1);
            //上滑
            if(sjs<20){hdhs();} else{toastLog('上滑')};
            //下滑
            if(sjs>18){hdhs(1);} else{};
            //点赞
            if(sjs==19||sjs==11) 
            {click(kd/2+sjs,gd/2+sjs);sleep(100+sjs);click(kd/2+sjs,gd/2+sjs);toastLog('点赞')};                        
            //去广告返回
            if(sjs<4){back();};  
            sleep(Math.random()*4000+6000);
          	toastLog('观看：'+i)
          if(packageName(appk).findOne(1000)){}
  					else{dkapp(apmc);back();sleep(3400);back();sleep(3400);hdhs();sleep(340);back();sleep(3400);back();sleep(3400);};
        }
        jg=apmc+shuangkcs+'成功✅';
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'刷视频'+'失败';}	
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*30*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};console.hide();
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------抖音极速版----------------------
function dyjsbzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间')
        //回到首页
        dsphsy();gbtc();sleep(spyc); jg=apmc+shuangkcs+'成功✅';
      log(jg); log(1234567);
       click(558*kd/1080,2250*gd/2340);sleep(10000);
        djjg=djzb('签到',1);click(482*kd/1080+Math.random()*3,1142*gd/2340+Math.random()*3)
      	sleep(2300);kgg('看广告','领取奖励');
         //回到首页
        dsphsy();gbtc();sleep(spyc); 
       click(558*kd/1080,2250*gd/2340);sleep(10000);
        djjg=djzb('签到',1);click(482*kd/1080+Math.random()*3,1142*gd/2340+Math.random()*3)
      	sleep(2300);kgg('看广告','领取奖励');
      //回首页
      dsphsy();gbtc();sleep(spyc);
       click(558*kd/1080+Math.random()*3,2250*gd/2340+Math.random()*3);sleep(10000);
      djjg=djzb('去提现',1);if(djjg){sleep(6000);djjg=djzb('0.3元',1);
                             if(djjg){sleep(4000);djjg=djzb('确认提现',1);}else{};
                                 }else{};
        //回首页
        dsphsy(); gbtc();sleep(spyc); jg=apmc+shuangkcs+'成功✅';
        console.show();                       
        for(i=1;i<2220;i++){
            var sjs=Math.floor(Math.random()*20+1);
            //上滑
            if(sjs<20){hdhs();} else{toastLog('上滑')};
            //下滑
            if(sjs>18){hdhs(1);} else{};
            //点赞
            if(sjs==19||sjs==11) 
            {click(kd/2+sjs,gd/2+sjs);sleep(100+sjs);click(kd/2+sjs,gd/2+sjs);toastLog('点赞')};                        
            //去广告返回
            if(sjs<4){back();sleep(1000)};  
 					 if(sjs==8){hdhs('z');sleep(spyc);back();};
   					if(sjs==9){hdhs('y');sleep(spyc);back();};
            if(i==120){  click(558*kd/1080+Math.random()*3,2250*gd/2340+Math.random()*3);sleep(10000);
                        sleep(2300);kgg('看广告','领取奖励');
                        dsphsy();};
            sleep(Math.random()*4000+6000);gbtc();
          	toastLog('观看：'+i)
  					if(packageName(appk).findOne(1000)){}
  					else{dkapp(apmc);back();sleep(3400);back();sleep(3400);hdhs();sleep(340);back();sleep(3400);back();sleep(3400);};
        }
        jg=apmc+shuangkcs+'成功✅';
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'签到'+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*30*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};console.hide();
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------抖音火山版----------------------
function dyhsbzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间')
        //回到首页
        djzb('精选',1);click(773*kd/1080+Math.random()*3,194*gd/2340+Math.random()*3);
        gbtc();dsphsy();jg=apmc+shuangkcs+'成功✅'; log(jg); log(1234567);
        try{djzb('com.ss.android.ugc.live:id/gng',2);sleep(3200);} catch(err){};
        hdhs();sleep(spyc);djjg=djzb('点击领取',1);back();sleep(spyc);back();sleep(3500);  
      	try{djzb('com.ss.android.ugc.live:id/gng',2);sleep(3200);} catch(err){};
        hdhs();sleep(spyc);djjg=djzb('点击领取',1);back();sleep(spyc);back();sleep(3500);
				back();sleep(spyc);back();sleep(3500);gbtc();
        //回首页
        djzb('精选',1);click(773*kd/1080+Math.random()*3,194*gd/2340+Math.random()*3);dsphsy();
        console.show();
        for(i=1;i<2220;i++){
            var sjs=Math.floor(Math.random()*20+1);
            //上滑
            if(sjs<20){hdhs();} else{toastLog('上滑')};
            //下滑
            if(sjs>18){hdhs(1);} else{};
            //点赞
            if(sjs==19||sjs==11) 
            {click(kd/2+sjs,gd/2+sjs);sleep(10+sjs);click(kd/2+sjs,gd/2+sjs);toastLog('点赞')};                        
            //去广告返回
            if(sjs<4){back();sleep(1000)};  
            sleep(Math.random()*4000+6000);gbtc();
          	toastLog('观看：'+i)
  					if(packageName(appk).findOne(1000)){}
  					else{dkapp(apmc);back();sleep(34000);back();sleep(34000);back();sleep(34000);back();sleep(34000);}
        }
        jg=apmc+shuangkcs+'成功✅';
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'刷视频'+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*30*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};console.hide();
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------支付宝领红包领积分----------------------
function zfbzx(){
    try{
      toastLog('开始进行支付宝领红包');sleep(1500);
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间');
        //回到首页
        sleep(3400);
        djzb('com.alipay.android.phone.openplatform:id/home_title_search_hint',2);
        sleep(2000);
        setClip(794396851);
        paste();sleep(1000);
        if(djzb('搜索')){} else{click(996*kd/1080,151*gd/2340);};sleep(1000);
        if(djzb('立即领红包',1)){} else{click(693*kd/1080,641*gd/2340);};sleep(7000);
        jg=apmc+shuangkcs+'成功✅';
      var xmmco='支付宝领红包';
      try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+xmmco+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
      catch(err){};
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'领红包'+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*5*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------------什么值得买----------------------
function smzdmzx(){
    try{
      toastLog('开始进行什么值得买签到');sleep(1500);
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+2000);
     	 toastLog('打开进入后有较长时间的跳过广告时间');
        back();sleep(3230);  back();sleep(3230);  
        //回到首页
        if(!djzb('com.smzdm.client.android:id/tab_usercenter',2))
        {click(920*kd/1080,2250*gd/2340);};
        sleep(2000);
        if(!djzb('com.smzdm.client.android:id/v_container_login_not_sign_animation',2))
        {click(855*kd/1080,350*gd/2340);};sleep(1000);
        sleep(4000);
        jg=apmc+shuangkcs+'成功✅';
        if(djzb('浏览专题天天抽',1)){sleep(2000);djzb('com.smzdm.client.android:id/bt_go',2);
        sleep(1000);shyc();sleep(4000);shyc();
        huisy('已连续签到');djzb('领奖励');djzb('知道了',1)};

        if(djzb('亲子游攻略',1)){sleep(2000);djzb('com.smzdm.client.android:id/bt_go',2);
            sleep(4000);shyc();sleep(4000);shyc();sleep(4000);shyc();
            huisy('已连续签到');djzb('领奖励');djzb('知道了',1)};
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*5*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------------淘特----------------------
function ttzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        setClip('红包一起赚  CZ8858  ￥[666]￥ dUxl2xS🎵💰uLqL  ￥[666]￥  来淘҈𝒕𝒆摇一摇');
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+6000);
     	 toastLog('打开进入后有较长时间的跳过广告时间');
        djzb('帮好友助力');huisy('天天领红包');
        back();sleep(3230);  back();sleep(3530);  
        huisy('天天领红包');
        //回到首页
        click(520*kd/1080,2250*gd/2340);
        djzb('天天领红包');sleep(3000);djzb('立即签到');sleep(3000);djzb('去提现');sleep(3000);djzb('立即开红包');
      jg=apmc+shuangkcs+'成功✅';
        huisy('天天领红包');
        djzb('现金签到');sleep(3000);djzb('点击签到',1);sleep(3000);djzb('签到得红包');back();sleep(3000);
        huisy('天天领红包');
        djzb('领取');djzb('继续摇红包');djzb('摇一摇',1);djzb('点击领取',1);sleep(2000);djzb('开心收下',1);
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*5*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
//---------------------------------京喜----------------------
function jxzx(){
    try{
        apmc=xm[0];shuangkcs=0;
    执行进程 = threads.start(function(){
    while(shuangkcs<shuangk){
        appk = getPackageName(apmc);
        shuangkcs++;
        gbapp(apmc);
        if(dkapp(apmc)){log('已打开')} else {执行进程.interrupt();};
        sleep(zyc+6000);
     	 toastLog('打开进入后有较长时间的跳过广告时间');
        djzb('取消');huisy('签到领红包');
        jg=apmc+shuangkcs+'成功✅';
        djzb('签到领红包');sleep(12000);
    }
});
}
catch(err){toastLog(apmc+'执行过程中出错');jg=apmc+shuangkcs+'失败';}
    back();back();back();back();back();back();back();back();back();back();
    //等待该线程完成
    toastLog('等待'+apmc+'执行');
    执行进程.join(sspscxs*shuangk*5*60*1000);
    xm.push(jg); 
 try{http.get('http://klxj.xyz/auto/jl.php?USER_ID='+USER_ID+'&ROBOT_ID='+ROBOT_ID+'&SCRIPT_ID='+sjxh+'&NAME='+jg+'&MODEL='+model+'&ONFREE='+onFreeTrial);}
catch(err){};
    print(pzar);
    toastLog('终止'+apmc+'执行');
    执行进程.interrupt();gbapp(apmc);
    toastLog(pzar);
};
function ghzx(){};
function ykxczx(){};
















//-------------------------------构建函数部分-------------------------------------------
//只写wz是text，ms=1是包含text，ms=2是id，ii是第几个，默认不写是0，ms=3是desc包含
function djzb(wz,ms,ii){
    if(ii>0){
        sleep(3000);
        switch(ms)
        {
            case 1:
                var w = textContains(wz).findOnce(ii);
                break;
            case 2:
                var w = id(wz).findOnce(ii);
                break;
            case 3:
                var w = descContains(wz).findOnce(2000);
                break;
            default:
                var w = text(wz).findOnce(ii);
        }
    }
    else{ 
            switch(ms)
            {
                case 1:
                    var w = textContains(wz).findOne(2000);
                    break;
                case 2:
                    var w = id(wz).findOne(3000);
                    break;
                 case 3:
                    var w = descContains(wz).findOne(2000);
                    break;
                default:
                    var w = text(wz).findOne(2000);
            }
        }
    if(w!= null){
        var b = w.bounds();
        click(b.centerX(), b.centerY());
        log('执行点击');
        return 1
    }else{log("未点击");
            return 0}
}

function shyc() {
    var randomP = random(500, 600);
    var points = [randomP];
    var interval = 0.1;
    var x0 = random(780, 900);
    var y0 = random(1500, 1600);
    var a = 240;
    for (var t = 0; t < Math.PI / 2; t += interval) {
      var x = x0 - a * (1.8 * Math.cos(t * 0.9) - Math.cos(2 * t * 0.9));
      var y = y0 - a * (5 * Math.sin(t * 0.9) - Math.sin(2 * t * 0.9));
      points.push([parseInt(x), parseInt(y)]);
    }
    gesture.apply(null, points);
    sleep(100);
  }

//音量键停脚本
function registerKey() {
    events.observeKey()
    events.onKeyDown('volume_down', function (event) {
        console.log('脚本停止')
      //engines.myEngine().forceStop();
      //停止所有
      engines.stopAllAndToast();
      //停其他
//       engines.all().map((ScriptEngine) => {
//       if (engines.myEngine().toString() !== ScriptEngine.toString()) {
//       ScriptEngine.forceStop();
//       }
//       });
    })
};
function dkapp(dkapmc){
    var dkcs=1;dkappk = getPackageName(dkapmc);
    if(!dkappk){toastLog('未发现'+dkapmc+'安装包，此过程终止！');return 0};
    while(dkcs<9){
        sleep(qjyc+2000);log(launchApp(dkapmc));toastLog('等待打开');
        sleep(qjyc+3000);djzb('允许');djzb('跳过',1);
        c=packageName(dkappk).findOne(4000);
        if(c!= null){toastLog('已加载APP,未识别到双开1'); 
        toastLog('未检测到此应用为双开应用');return 1}
        else{
            toastLog('正尝试打开APP，如双开则自动选择APP');
            if (shuangkcs==1){djjg=click(dkapmc,0);} else {djjg=click(dkapmc,1);};
            shuangk=2;toastLog('已检测到此应用为双开应用');
            sleep(qjyc+2000);};
        djzb('跳过',1);sleep(qjyc+2000);djzb('允许');
        c=packageName(dkappk).findOne(7000);
        if(c!= null){toastLog('第'+dkcs+'次尝试打开APP成功');return 1}
        else {dkcs++;toastLog('第'+dkcs+'次尝试打开APP失败，最多重试8次，正尝试再次打开');  
        launchApp(yxhj);packageName(getPackageName(yxhj)).findOne(5000);};
        };
    if(c!= null){toastLog('已成功打开APP'+dkapmc);sleep(qjyc+5000);return 1}
        else{ toastLog('未能打开APP'+dkapmc);return 0}
}

//关闭APP

//关闭APP
function gbapp(pknm) {
    try{
      home();sleep(qjyc+500);
      toastLog('先关闭APP'+pknm);
      var cmc = getPackageName(pknm);
      if(!cmc){toastLog('未发现安装包，跳过本过程');return 0};
      app.openAppSetting(cmc);
      toastLog('打开关闭设置');
      sleep(qjyc+6000);
      let is_sure = textMatches(/(.*强行.*|.*停止.*|.*结束.*|.*关闭.*|.*立即.*)/).find();
      if (is_sure)
      {
          for (var tz of is_sure){       log(1);
              try{click(tz.bounds().centerX(),tz.bounds().centerY());}catch(err){log(11)};
              sleep(qjyc+1000)};
          is_sure = textMatches(/(.*确定.*|.*强行.*|.*停止.*|.*结束.*|.*关闭.*|.*立即.*)/).find();
          for (var tz of is_sure){      log(2);  
              try{click(tz.bounds().centerX(),tz.bounds().centerY());}catch(err){log(11)};
              sleep(qjyc+1000)};
          sleep(qjyc+2000);
      } else {
          toastLog(app.getAppName(cmc) + "未在运行，不能关闭APP");
      }
      sleep(qjyc+100);back();sleep(qjyc+100);back();sleep(qjyc+100);home();sleep(qjyc+100);
    } 
    catch(err){};
}
//回首页
//回首页
function huisy(textt,apmca){
    if(apmca){} else{apmca=apmc};appka=getPackageName(apmca);
    for(icc=1;icc<8;icc++){
        var cc=text(textt).packageName(appka).findOne(1000);
        if(cc!= null){
             return 1;
        }else{
            back();sleep(qjyc+3000);}
        return 0
    }
  }
//时间
function formatDate(date, formatter) {
    if (typeof date !== 'object') {
        date = new Date(date);
    }
    var transform = function (value) {
        return value < 10 ? '0' + value : value;
    };
    return formatter.replace(/^YYYY|MM|DD|hh|mm|ss/g, function (match) {
        switch (match) {
            case 'YYYY':
                return transform(date.getFullYear());
            case 'MM':
                return transform(date.getMonth() + 1);
            case 'mm':
                return transform(date.getMinutes());
            case 'DD':
                return transform(date.getDate());
            case 'hh':
                return transform(date.getHours());
            case 'ss':
                return transform(date.getSeconds());
        }
    });
};

//滑动
function hdhs(fx){
    var w = device.width;
  var h = device.height;
    if (fx == '' || fx == undefined || fx == 's' ){
      log('屏幕向上随机滑动')
   swipe(w * 0.6 - random(10, 30), h * 0.7 + random(10, 20), w * 0.6 + random(50, 80), h * 0.4 + random(10, 30), random(220, 235))
    }else if(fx == 'z'){
        log('屏幕向左随机滑动')
   swipe(w * 0.8 - random(10, 30), h * 0.5 + random(10, 20), w * 0.3 + random(50, 80), h * 0.5 + random(10, 30), random(220, 235))
    }else if(fx == 'y'){
        log('屏幕向右随机滑动')
   swipe(w * 0.3 - random(10, 30), h * 0.5 + random(10, 20), w * 0.8 + random(50, 80), h * 0.5 + random(10, 30), random(220, 235))
    }else if(fx == 'x'|| fx == 1){
        log('屏幕向下随机滑动')
   swipe(w * 0.6 - random(10, 30), h * 0.4 + random(10, 20), w * 0.6 + random(50, 80), h * 0.7 + random(10, 30), random(220, 235))
    }
  
  }

//短视频关闭弹窗
function gbtc(){
    关闭弹窗=threads.start(function(){
        if(auto.service != null){
        var xco=0;
        var xct=0;
        var xctt=0;
        while(true){
          let is_sure = textMatches(/(.*立即.*|.*邀请.*|.*暂不.*|.*坚持.*|.*知道了.*|.*查看更多.*|.*看广告.*|.*放弃奖励.*)/).findOne(1000);
   			 if (is_sure){click(is_sure.bounds().centerX(),is_sure.bounds().centerY());sleep(1000)};
           //正则表达式可自行修改
           let Allow = textMatches(/(立即开始|拒绝|暂不使用|放弃奖励|立即邀请|坚持退出|我知道了|以后再说|同意|上滑查看更多视频|依次点击文字:|请完成下列验证后继续:|拖动滑块，完成拼图)/).findOne(2*1000);
           if(Allow){
             djzb();
           Allow_text=Allow.text();
           if("依次点击文字:"==Allow_text){
           if(0==xco){
           Allow_1=Allow.depth();
           }else{
           if(Allow_1===Allow.depth()){
           }else{
           }
           }
           xco++;
           }else if("请完成下列验证后继续:"==Allow_text){
           if(0==xct){
           //depth=10  indexInParent=1
           Allow_2= Allow.depth();
           }else{
           if(Allow_2===Allow.depth()){
           }else{
           }
           }
           xct++;
           }else if("拖动滑块，完成拼图"==Allow_text){
           if(0==xctt){
           Allow_3=Allow.depth();
           }else{
           if(Allow_3===Allow.depth()){
           }else{
           }
           }
           xctt++;
           }else if("上滑查看更多视频"==Allow_text){
           //出现这个弹窗不滑动屏幕模拟点击脚本会阻塞
           swipe(random(device.width/2-50,device.width/2+50), random(device.height/2+200, device.height/2+300), random(device.width/2+50,device.width/2+100), random(50, 100), 700);
           sleep(random(500, 1000));
           swipe(random(device.width/2-50,device.width/2+50), random(device.height/2+200, device.height/2+300), random(device.width/2+50,device.width/2+100), random(50, 100), 700);
           sleep(random(500, 1000));
           toastLog('上滑');
           }else{
           Allow.click();
           log("关闭"+Allow.text()+"弹窗");
           }
           }
           }
           }
        });
        关闭弹窗.join(20*1000);   
        //注意脚本运行完毕关闭子线程
        关闭弹窗.interrupt();
}


function dsphsy(){
    back();sleep(spyc);back();sleep(spyc);hdhs();sleep(spyc);
    sleep(spyc);gbtc();sleep(spyc);hdhs();sleep(spyc);
    back();sleep(spyc);gbtc();sleep(spyc);back();sleep(spyc);
    back();sleep(spyc);gbtc();sleep(spyc);back();sleep(spyc);
}
function kgg(dycwz,decwz){
    djjg=djzb(dycwz,1);
    if(djjg){
    for (i=1;i<10;i++){sleep(51300);back();sleep(1000);djjg=djzb(decwz,1);
                       if(djjg){}else{break;};
           }}; 
}
//分割数据
function subGroup(arr, len) {
    var newArr = [];
    for(var i = 0; i < arr.length; i += len){
      newArr.push(arr.slice(i, i + len));
    }
    return newArr;
  }
//合并数据
function hbjg(arrjg){
    var jywb='';
    for (xm of arrjg){
    if(xm[0]=='不运行'){} else {
        for (i=0;i<xm.length;i++){
        if (i==0){
            jywb=jywb+xm[i]+',';
        }
        else if(i==1&&xm.length==2){
            jywb=jywb+'你选择【'+xm[i]+'】模式，运行结果为：<br/>';
        }
        else if(i==1&&xm.length!=2){
            jywb=jywb+'你选择【'+xm[i]+'】模式，运行结果为：';
        }
        else if(i==xm.length-1){
            jywb=jywb+xm[i]+'。<br/><br/>';
        }
        else{
            jywb=jywb+xm[i]+'、';
        }
        }  }
    };
    return jywb
}
//阅读提现
function ydtx(){
    try{
    djzb('积分兑换');sleep(1000);djzb('提现');djzb('可提现',1);sleep(2000);
  if(textContains('提现').clickable().findOne(2000)) {textContains('提现').clickable().click();} 
  else {click(570*kd/1080,1111*gd/2340)};sleep(1000);
  djzb('提现');sleep(1000);
  cc=text('arrow1').findOne(1100);if(cc){ log('云扫码提现');log(cc.bounds().centerX());log(cc.bounds().centerY());
      swipe(cc.bounds().centerX(),cc.bounds().centerY(),1000*kd/1080,cc.bounds().centerY(),400);sleep(1000);log('已滑动提现')};
  sleep(1000);djzb('确定',1);sleep(1000);back();
      return '已提现'
    }
    catch(err){return '未提现'}
  }



//系统允许截图权限----------------------
function jietuquanx(){
    try{
        //允许进程
    try{ try{允许进程.interrupt();}catch(err){};
        允许进程 = threads.start(function() {
        //在新线程执行的代码
        var btn = className("android.widget.Button").textMatches(/允许|立即开始|统一|START NOW/).findOne(5000);
        if (btn) {
            sleep(qjyc+1000);
            btn.click();
        } else{'未发现申请'};
        }); 
    }catch(err){log(122);log(err.message);};

    log('开始申请截图权限');
    try{ try{权限进程.interrupt(); }catch(err){};
        权限进程 = threads.start(function() {
            if(!requestScreenCapture()){ toast("请求截图失败");} else{toast("请求截图成功");};
        }); 
    }catch(err){log(222);log(err.message);};
    权限进程.join(5000);
    log(1);}catch(err){};
    };

    //截图一张---1以外是截图返回找图图名、1是返回名称及地址、不写或者0是返回图片名-------------------
    function jietu(fhm){
    try{
        try {files.create("/sdcard/00js/")} catch(err){log(err.message);};
    if(!fhm||fhm==1){
        var sjc=formatDate(new Date(), "YYYY-MM-DD-hh-mm-ss")
        var tpmc="Screenshot_" + sjc + ".png";
        var jtmc="/sdcard/00js/"+tpmc
        captureScreen(jtmc);
        log('成功截图');
        var img2 = images.read(jtmc);
        images.save(img2,jtmc,"png",8);toastLog('压缩成功');
        //用媒体，扫描完图片之后就就可以了
        media.scanFile(jtmc);log(222);
        if(fhm){fhm=jtmc;log('返回名称及地址');} else{fhm=tpmc;log('返回名称');};
                    } 
        else{
            fhm=images.captureScreen();
        };
        return fhm
    }
    catch(err){log('截图失败');log(322);log(err.message);return 0}
    };
    //时间格式化
    function formatDate(date, formatter) {
    if (typeof date !== 'object') {
        date = new Date(date);
    }
    var transform = function (value) {
        return value < 10 ? '0' + value : value;
    };
    return formatter.replace(/^YYYY|MM|DD|hh|mm|ss/g, function (match) {
        switch (match) {
            case 'YYYY':
                return transform(date.getFullYear());
            case 'MM':
                return transform(date.getMonth() + 1);
            case 'mm':
                return transform(date.getMinutes());
            case 'DD':
                return transform(date.getDate());
            case 'hh':
                return transform(date.getHours());
            case 'ss':
                return transform(date.getSeconds());
        }
    });
    }

//微信进入网址
function wxjrwz(jrwzmc){
    if(!text('文件传输助手').findOne(100)){log('不在传输助手中');return 2};
    var ecdj=0;djjg=0;
    djjg=djzb(jrwzmc);
    sleep(qjyc+zyc);
    try{ecdj=djzb(jrwzmc);} catch(err){};
    sleep(qjyc+6000);
    if(!text('文件传输助手').findOne(100)){log('已进入网址');return 1}
    else {toastLog('未成功点击，本网址跳过'); return 0};
    }
    